#ifndef __MY_RTS_DESIGNER_INTERNAL
#define __MY_RTS_DESIGNER_INTERNAL

/*******************************************************************
   HEADERS
 *******************************************************************/
#include "ELDsgnr.hpp"
#include "HCFGStorage.h"
#include "dsClasses.h"

#define MSG_DSN_UPDINSP  (MSG_OSK_LASTUSED+10)

/*******************************************************************
   MENU ITEMS
 *******************************************************************/
//[pkgApp.cpp]
enum ItemTags {
//File
  MI_SAVE         = 100,
  MI_SAVEAS       = 101,

//Edit
  MI_DESIGNSWITCH = 200,
  MI_CUT          = 201,
  MI_COPY         = 202,
  MI_PASTE        = 203,
  MI_DELETE       = 204,
  MI_SELECTALL    = 205,

  MI_TOFRONT      = 206,
  MI_TOBACK       = 207,
  MI_ALIGN        = 208,
  MI_ALEFT        = 209,
  MI_ATOP         = 210,
  MI_ARIGHT       = 211,
  MI_ABOTTOM      = 212,
  MI_VCENTER      = 213,
  MI_HCENTER      = 214,
  MI_ALIGNDLG     = 215,
  MI_ASNAPGRID    = 216,
  MI_DUPLICATE    = 217,
  MI_ALIGNITEM    = 218,

  MI_LK_NOMOVE    = 220,
  MI_LK_NORESIZE  = 221,
  MI_LK_NODELETE  = 222,
  MI_LK_NOINSERT  = 223,
  MI_LK_NOCOPY    = 224,

  MI_VAR_NAMEEDIT = 225,
  MI_VAR_TEXTEDIT = 226,

//Config
  MI_OPTIONS      = 300,
  MI_PALETTE      = 301,
  MI_INSPECTOR    = 303,
  MI_ZOOMTOOLS    = 307,

//Windows
  MI_CLOSE        = 400,
  MI_NEXT         = 401,
  MI_PREV         = 402,
  MI_CLOSEALL     = 403,
  MI_DELIMITER    = 450,

//Design editors
  MI_DESIGN       = 500,

  _MI_NONE
};

/*******************************************************************
   FormArray
 *******************************************************************/
//[dsForms.cpp]
LOCALSTRUCT( FormItem )
  AnsiString      FileName;
  bool            RealFile;
  bool            Changed;
  bool            SavedToStream;
  TMemoryStream  *ControlStream;

  __fastcall FormItem( void );
  __fastcall ~FormItem();

  AnsiString TabName( void );
  CONSTSTR   TextInfo( void );
  void       Save( void );
  void       SaveAs( const AnsiString& nm );
};

LOCALCLASSBASE( FormArray, public MyArray<PFormItem> )
  public:
    __fastcall FormArray( void );

    int __fastcall Locate( const AnsiString& nm );
};

/*******************************************************************
   FUNCTIONS
 *******************************************************************/
//[pkgConfig.cpp]
bool __fastcall Configuration( void );

//[dsAlign.cpp]
bool __fastcall QueryAlign( TELDesignerAlignType& h, TELDesignerAlignType& v );

//[dsDesigns.cpp]
void __fastcall RegisterRTDesigners( void );

/*******************************************************************
   VARS
 *******************************************************************/
//[pkgApp.cpp]
extern PHStorageLink Opt;

/*******************************************************************
   OPTIONS
 *******************************************************************/
#define GOPT( nm, def )  Opt->Read( nm, def )
#define SOPT( nm, val )  Opt->Write( nm, val )

#endif